/*
 * main.c
 *
 *  Created on: Jan 21, 2013
 *      Author: justin
 */


#include <avr/io.h>
#include <util/delay.h>

int usartInit(){
	/*defaults to usart 0 and 9600 baud unless otherwise specified*/
//	if usartNum==0xff
#define BAUDRATE 9600
#define BAUD_PRESCALLER (((F_CPU / (BAUDRATE * 16UL))) - 1)
	UBRR0H = (uint8_t)(BAUD_PRESCALLER>>8);
	UBRR0L = (uint8_t)(BAUD_PRESCALLER);
	UCSR0B = (1<<RXEN0)|(1<<TXEN0);
	UCSR0C = ((1<<UCSZ00)|(1<<UCSZ01));//comment removed
	return 0;
}

int main(){
	DDRC=0xff;
	usartInit();
	while(1){
		_delay_ms(25);
		PORTC=0x00;
		_delay_ms(25);
		PORTC=0xff;
//		_delay_us(1000000);
	}
}
